<?php
/** @var \Laravel\Lumen\Routing\Router $router */
$router->group(['namespace' => 'Common', 'prefix' => 'api/openapi', 'middleware' => ['ApiLog']], function () use ($router) {
    /**测试用**/
    $router->post("/v1/test/queueWork", "TestController@queueWork");
    $router->post("/v1/test/testShandeCreateSign", "TestController@testShandeCreateSign");
    $router->post("/v1/test/testShandeVerifySign", "TestController@testShandeVerifySign");
    $router->post("/v1/test/ShandeVerifySign", "TestController@ShandeVerifySign");
    $router->post("/v1/test/clearKey", "TestController@clearKey");
    /**测试用**/

    // 企业赋能自动领取,回调
    $router->post("/v1/callback/privilegeAutoReceiveCallback", "CallbackController@privilegeAutoReceiveCallback");
    // ugc赋能自动领取,回调
    $router->post("/v1/callback/ugcAutoReceiveCallback", "CallbackController@ugcAutoReceiveCallback");

    $router->group(['middleware' => ['checkPlatform', 'checkSign']], function ($router) {

        // 登入
        $router->post("/v1/user/login", "MemberController@login");
        // 用户注册+实名认证
        $router->post("/v1/user/registerAuthMember", "MemberController@registerAuthMember");

        // 查询创作者信息
        $router->post("/v1/merchants/info", "MerchantsController@info");
        // 查询创作者全部藏品
        $router->post("/v1/merchants/specialList", "MerchantsController@specialList");
        // 创作者入驻申请
        $router->post("v1/merchants/merchantInfoCreate", "MerchantsController@merchantInfoCreate");
        // 创作者入驻申请编辑
        $router->post("v1/merchants/merchantInfoSave", "MerchantsController@merchantInfoSave");

        // 添加藏品
        $router->post("/v1/special/create", "SpecialController@create");
        // 查询藏品详情
        $router->post("/v1/special/detail", "SpecialController@detail");
        // 藏品赋能
        $router->post("/v1/special/privilege", "SpecialController@privilege");
        // 发放藏品
        $router->post("/v1/special/send", "SpecialController@send");
        // 编辑藏品上下架状态
        $router->post("/v1/special/editStatus", "SpecialController@editSpecialStatus");
        // 删除藏品-还原铸造数
        $router->post("/v1/special/deleteSpecial", "SpecialController@deleteSpecial");

        // 查询卡券列表
        $router->post("/v1/coupon/list", "CouponController@list");
        // 查询卡券库存
        $router->post("/v1/coupon/stock", "CouponController@stock");

        // 查询用户全部藏品
        $router->post("/v1/member/specialList", "MemberController@specialList");
        // 查询用户全部商品
        $router->post("/v1/member/goodsList", "MemberController@goodsList");
        // 查询用户ugc赋能订单
        $router->post("/v1/member/ugcOrderList", "MemberController@ugcOrderList");
        // 查询用户最早下单时间(批量)
        $router->post("/v1/member/earliestOrderTime", "MemberController@earliestOrderTime");

        // 商品详情
        $router->post("/v1/goods/detail", "GoodsController@detail");
        // 商品通兑
        $router->post("/v1/goods/exchange", "GoodsController@exchange");
        // 商品通兑状态
        $router->post("/v1/goods/exchangeStatus", "GoodsController@exchangeStatus");
        // 商品转移
        $router->post("/v1/goods/move", "GoodsController@move");
        // ugc赋能绑定
        $router->post("/v1/goods/ugcBind", "GoodsController@ugcBind");
        // ugc赋能解绑
        $router->post("/v1/goods/ugcUnbind", "GoodsController@ugcUnbind");
        // ugc商品转移
        $router->post("/v1/goods/ugcMove", "GoodsController@ugcMove");
        // 商品锁定/解锁
        $router->post("/v1/goods/lock", "GoodsController@lock");

        //  订单列表
        $router->post("/v1/order/list", "OrderController@orderList");

        // 获取领取分类
        $router->post("v1/assort/assortList", "AssortController@getAssort");

        // 创作者入驻申请查询
        $router->post("v1/merchants/getApplyForInfo", "MerchantsController@getApplyForInfo");
        // 创作者铸造数充值、撤销
        $router->post("v1/casting/castingAccount", "MerchantsCastingController@castingAccount");
        // 创作者铸造数变更日志
        $router->post("v1/casting/getMerchantsCastingLog", "MerchantsCastingController@getMerchantsCastingLog");

        //  藏品专辑
        $router->post("/v1/album/list", "AlbumController@list");
        $router->post("/v1/album/edit", "AlbumController@edit");
        $router->post("/v1/album/delete", "AlbumController@delete");
        $router->post("/v1/album/detail", "AlbumController@detail");

        $router->post("/v1/special/apply/add", "SpecialApplyController@add");
        $router->post("/v1/special/apply/edit", "SpecialApplyController@edit");

        $router->post("/v1/image/list","ImageController@list");
        $router->post("/v1/image-type/list","ImageController@typeList");



    });


});
